package com.link2room.soundwave.feign.optimus;

import com.link2room.common.dto.result.base.BaseResultDto;
import com.link2room.optimus.dto.param.base.PriceStaticBaseParamDto;
import com.link2room.optimus.dto.result.base.PriceDto;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * @author sqj88
 * @date 2017/11/7 21:50
 */
@FeignClient("${spring.gateway.name}/${feign.optimus}")
public interface StaticPriceFeignService {
    /**
     * 查询基价
     * @param paramMap
     * @return
     * @throws Exception
     */
    @RequestMapping(method = RequestMethod.GET,value = "/in/StaticPrices",consumes = MediaType.APPLICATION_JSON_VALUE)
    BaseResultDto<PriceDto> getStaticPrices(@RequestParam Map<String, Object> paramMap)throws Exception;

    /**
     * 更新基价
     * @param priceStaticBaseParamDto
     * @return
     * @throws Exception
     */
    @RequestMapping(method = RequestMethod.PUT,value = "/in/StaticPrices",consumes = MediaType.APPLICATION_JSON_VALUE)
    BaseResultDto updateStaticPrices(@RequestBody PriceStaticBaseParamDto priceStaticBaseParamDto) throws Exception;

    /**
     * 更新增量基价
     * @param priceStaticBaseParamDto
     * @return
     * @throws Exception
     */
    @RequestMapping(method = RequestMethod.PUT,value = "/in/StaticPrices/StaticDayPriceIncrement",consumes = MediaType.APPLICATION_JSON_VALUE)
    BaseResultDto updateStaticPricesIncrement(@RequestBody PriceStaticBaseParamDto priceStaticBaseParamDto) throws Exception;

}
